import { IsDateString, IsInt, Min, Max } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class SalesStatisticsDto {
  @ApiProperty({ description: '开始日期', example: '2024-01-01' })
  @IsDateString()
  startDate: string;

  @ApiProperty({ description: '结束日期', example: '2024-01-31' })
  @IsDateString()
  endDate: string;
}

export class TopProductsDto {
  @ApiProperty({ description: '返回数量', example: 10, required: false })
  @IsInt()
  @Min(1)
  @Max(100)
  limit?: number;
}
